package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsEvidenceRuleItemMapper;
import com.ruoyi.fs.domain.FsEvidenceRuleItem;
import com.ruoyi.fs.service.IFsEvidenceRuleItemService;

/**
 * 证据规则项目Service业务层处理
 * 
 * @author hero
 * @date 2024-08-25
 */
@Service
public class FsEvidenceRuleItemServiceImpl implements IFsEvidenceRuleItemService 
{
    @Autowired
    private FsEvidenceRuleItemMapper fsEvidenceRuleItemMapper;

    /**
     * 查询证据规则项目
     * 
     * @param itemId 证据规则项目主键
     * @return 证据规则项目
     */
    @Override
    public FsEvidenceRuleItem selectFsEvidenceRuleItemByItemId(Long itemId)
    {
        return fsEvidenceRuleItemMapper.selectFsEvidenceRuleItemByItemId(itemId);
    }

    /**
     * 查询证据规则项目列表
     * 
     * @param fsEvidenceRuleItem 证据规则项目
     * @return 证据规则项目
     */
    @Override
    public List<FsEvidenceRuleItem> selectFsEvidenceRuleItemList(FsEvidenceRuleItem fsEvidenceRuleItem)
    {
        return fsEvidenceRuleItemMapper.selectFsEvidenceRuleItemList(fsEvidenceRuleItem);
    }

    /**
     * 新增证据规则项目
     * 
     * @param fsEvidenceRuleItem 证据规则项目
     * @return 结果
     */
    @Override
    public int insertFsEvidenceRuleItem(FsEvidenceRuleItem fsEvidenceRuleItem)
    {
        fsEvidenceRuleItem.setCreateTime(DateUtils.getNowDate());
        return fsEvidenceRuleItemMapper.insertFsEvidenceRuleItem(fsEvidenceRuleItem);
    }

    /**
     * 修改证据规则项目
     * 
     * @param fsEvidenceRuleItem 证据规则项目
     * @return 结果
     */
    @Override
    public int updateFsEvidenceRuleItem(FsEvidenceRuleItem fsEvidenceRuleItem)
    {
        fsEvidenceRuleItem.setUpdateTime(DateUtils.getNowDate());
        return fsEvidenceRuleItemMapper.updateFsEvidenceRuleItem(fsEvidenceRuleItem);
    }

    /**
     * 批量删除证据规则项目
     * 
     * @param itemIds 需要删除的证据规则项目主键
     * @return 结果
     */
    @Override
    public int deleteFsEvidenceRuleItemByItemIds(Long[] itemIds)
    {
        return fsEvidenceRuleItemMapper.deleteFsEvidenceRuleItemByItemIds(itemIds);
    }

    /**
     * 删除证据规则项目信息
     * 
     * @param itemId 证据规则项目主键
     * @return 结果
     */
    @Override
    public int deleteFsEvidenceRuleItemByItemId(Long itemId)
    {
        return fsEvidenceRuleItemMapper.deleteFsEvidenceRuleItemByItemId(itemId);
    }
}
